package chabernac.gravidroid.paint;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.view.View;
import chabernac.android.draw.AbstractDrawable;
import chabernac.gravidroid.model.Vector;
import chabernac.gravidroid.model.iMass;

public class CenterDrawable extends AbstractDrawable {
    private final iMass myMass;
    private final Paint myPaint;

    public CenterDrawable( iMass aMass ) {
        super();
        myMass = aMass;
        myPaint = new Paint();
        myPaint.setColor( Color.YELLOW );
        myPaint.setStyle(Style.FILL);
    }


    @Override
    public void paint( Canvas aCanvas, View aView ) {
        Vector theCenterPoint = myMass.getCenterPoint();
        aCanvas.drawCircle(theCenterPoint.x, theCenterPoint.y, 5, myPaint);
    }

}
